create external table jms_dm.dm_end_dispatch_inout_hour_dt (
   date_time string comment '查询日期',
   virt_code string comment '虚拟代理区code',
   virt_name string comment '虚拟代理区name',
   agent_code string comment '代理区编码',
   agent_name string comment '代理区名称',
   fran_code string comment '加盟商code',
   fran_name string comment '加盟商名称',
   scan_site_code string comment '网点编码',
   scan_site_name string comment '网点名称',
   business_id string comment '品牌id',
   business_name string comment '品牌名称',
   source string comment '末端类型',
   build_type string comment '建设类型',
   store_type string comment '门店属性',
   store_code string comment '门店编码',
   store_name string comment '门店名称',
   scan_cnt_in      int comment '入库总量',
   scan_cnt_out     int comment '出库总量',
   in_time_stage00  int comment '入库量00-01',
   out_time_stage00 int comment '出库量00-01',
   in_time_stage01  int comment '入库量01-02',
   out_time_stage01 int comment '出库量01-02',
   in_time_stage02  int comment '入库量02-03',
   out_time_stage02 int comment '出库量02-03',
   in_time_stage03  int comment '入库量03-04',
   out_time_stage03 int comment '出库量03-04',
   in_time_stage04  int comment '入库量04-05',
   out_time_stage04 int comment '出库量04-05',
   in_time_stage05  int comment '入库量05-06',
   out_time_stage05 int comment '出库量05-06',
   in_time_stage06  int comment '入库量06-07',
   out_time_stage06 int comment '出库量06-07',
   in_time_stage07  int comment '入库量07-08',
   out_time_stage07 int comment '出库量07-08',
   in_time_stage08  int comment '入库量08-09',
   out_time_stage08 int comment '出库量08-09',
   in_time_stage09  int comment '入库量09-10',
   out_time_stage09 int comment '出库量09-10',
   in_time_stage10  int comment '入库量10-11',
   out_time_stage10 int comment '出库量10-11',
   in_time_stage11  int comment '入库量11-12',
   out_time_stage11 int comment '出库量11-12',
   in_time_stage12  int comment '入库量12-13',
   out_time_stage12 int comment '出库量12-13',
   in_time_stage13  int comment '入库量13-14',
   out_time_stage13 int comment '出库量13-14',
   in_time_stage14  int comment '入库量14-15',
   out_time_stage14 int comment '出库量14-15',
   in_time_stage15  int comment '入库量15-16',
   out_time_stage15 int comment '出库量15-16',
   in_time_stage16  int comment '入库量16-17',
   out_time_stage16 int comment '出库量16-17',
   in_time_stage17  int comment '入库量17-18',
   out_time_stage17 int comment '出库量17-18',
   in_time_stage18  int comment '入库量18-19',
   out_time_stage18 int comment '出库量18-19',
   in_time_stage19  int comment '入库量19-20',
   out_time_stage19 int comment '出库量19-20',
   in_time_stage20  int comment '入库量20-21',
   out_time_stage20 int comment '出库量20-21',
   in_time_stage21  int comment '入库量21-22',
   out_time_stage21 int comment '出库量21-22',
   in_time_stage22  int comment '入库量22-23',
   out_time_stage22 int comment '出库量22-23',
   in_time_stage23  int comment '入库量23-24',
   out_time_stage23 int comment '出库量23-24'
) COMMENT '三方驿站驿站各时段出入库'
PARTITIONED BY (dt STRING COMMENT '日期分区')
STORED AS PARQUET
LOCATION '/dw/hive/jms_dm.db/external/dm_end_dispatch_inout_hour_dt'
TBLPROPERTIES (
'discover.partitions'='false',
'parquet.column.index.access'='true'
);
